package com.kalvin.kvf.modules.sys.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kalvin.kvf.modules.sys.entity.Approve;
import com.kalvin.kvf.modules.sys.mapper.ApproveMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 * @since 2021-04-21 21:34:12
 */
@Service
public class ApproveServiceImpl extends ServiceImpl<ApproveMapper, Approve> implements ApproveService {

    @Resource
    ApproveMapper approveMapper;

    @Override
    public Page<Approve> listApprovePage(Approve approve) {
        Page<Approve> page = new Page<>(approve.getCurrent(), approve.getSize());
        List<Approve> approves = baseMapper.selectApproveList(approve, page);
        return page.setRecords(approves);
    }

    @Override
    public List<String> selectContent() {
        return approveMapper.selectContent();
    }

}
